using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class Tbs_NoRatesMap : EntityTypeConfiguration<Tbs_NoRates>
    {
        public Tbs_NoRatesMap()
        {
            // Primary Key
            this.HasKey(t => t.Type);

            // Properties
            this.Property(t => t.Type)
                .IsRequired()
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("Tbs_NoRates");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.Type).HasColumnName("Type");
        }
    }
}
